﻿using System;
using System.Web.UI.WebControls;


public partial class Default2 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
       
        
        

        for (int k = 0; k < 2; k++)
        {

            TableRow headerRow = new TableRow();
            headerRow.CssClass = "GridViewHeader";
            // header 
            TableHeaderCell headerCell = new TableHeaderCell();
            headerCell.Text = "ID";
            headerRow.Cells.Add(headerCell);
            headerCell = new TableHeaderCell();
            headerCell.Text = "Name";
            headerRow.Cells.Add(headerCell);
            Table1.Rows.Add(headerRow);


            for (int i = 0; i < 5; i++)
            {
                TableRow rows = new TableRow();
                rows.CssClass = "AlternativeRowStyle";
                TableCell cell = new TableCell();

                cell.Text = i.ToString();

                
                rows.Cells.Add(cell);
                cell  = new TableCell();
                cell.Text = "Name";
                rows.Cells.Add(cell);
                Table1.Rows.Add(rows);

            }
        }
        //for (int i = 0; i < 5; i++)
        //{
        //    Table1.Rows[i].Cells[0].Text = i.ToString();



        //}
        
    }
}
